﻿@model IEnumerable<MWTWorkUnitMgmtTool.BusinessEntities.Mapping>

@{
    ViewBag.Title = "Index" ;
    Layout = "~/Views/Shared/_Layout.cshtml";
    
}

<h2>Please Type The BOM Name</h2> 

<input id="bomName" type="text" name="q" data-autocomplete="@Url.Action("AutoCompleteItems", "Mapping")"/>
<input  id="submit" type="submit" value="Search"  />

<table id="searchResults" class="display">
<thead>
    <tr>
        
        <th>
            ItemCode
        </th>
        <th>
            ItemName
        </th>
        <th>
            LocationCode
        </th>
        <th>
            WorkUnitCode
        </th>
             
    </tr>
    </thead>
    <tbody>


</tbody>

</table>

@*<script src="../../Scripts/jquery-1.4.4-vsdoc.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript">


//    $(document).ready(function () {
//        $('#submit').click(function () {
//            $('#searchResults').dataTable({
//                "bServerSide": true,
//                "sAjaxSource": "Mapping/Searcher",
//                "bProcessing": true,
//                "aoColumns": [{ "mData": "ItemCode" },
//                { "mData": "ItemName" },
//                { "mData": "LocationCode" },
//                { "mData": "WorkUnitCode" }

//            ],
//                "fnServerParams": function (aoData) {
//                    aoData.push({
//                        "name": "BOMName",
//                        "value": $('#bomName').val()
//                    })
//                }


//            });

//        });

//    }); 


@*</script>*@

<p>
    @Html.ActionLink("Create New", "Create")
</p>


